php remove parentheses and contents from string

99

php remove parentheses and contents from string -

$string = "ABC (Test1)";
echo preg_replace("/\([^)]+\)/","",$string); // 'ABC '

Comments

Submit
0 Comments